package svc

import (
	"github.com/zeromicro/go-zero/core/stores/redis"
	"github.com/zeromicro/go-zero/core/stores/sqlx"
	"gozero-learn/user-api/internal/config"
)

type ServiceContext struct {
	Config      config.Config
	Mysql       sqlx.SqlConn
	RedisClient *redis.Redis
}

func NewServiceContext(c config.Config, db sqlx.SqlConn, redis *redis.Redis) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		Mysql:       db,
		RedisClient: redis,
	}
}
